﻿"use strict";

Function.prototype.method = function (name, func) {
    this.prototype[name] = func;
    return this;
};

//Function.method('inherits', function (Parent) {
//    this.prototype = new Parent();
//    return this;
//});

Function.prototype.inherits = function(Parent) {
    this.prototype = new Parent();
    return this;
}

//define beget function (procrear) (engendrar padre a hijo)
(function() {
    if (typeof Object.beget !== 'function') {
        Object.beget = function(o) {
            var F = function() {};
            F.prototype = o;
            return new F();
        };
    }
})();
